home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / mxu_v152.zip / MAXLIST.PAS < prev    next >
Pascal/Delphi Source File  |  1997-06-01  |  4KB  |  116 lines

  1. {
  2. ───────────────────────────────────────────────────────────────────────────────
  3.   ▀▀▀   ▀▀▀   ▀▀▀▀▀   ▀▀   ▀▀
  4.   ▀▀▀▀ ▀▀▀▀  ▀▀   ▀▀   ▀▀ ▀▀
  5.   ▀▀ ▀▀▀ ▀▀  ▀▀▀▀▀▀▀    ▀▀▀    ╔══ ╦═╗ ╔═╗ ╦═╗ ╦ ╦ ╦ ╔═╗ ╔═╗
  6.   ▀▀  ▀  ▀▀  ▀▀   ▀▀   ▀▀ ▀▀   ║ ╦ ╠╦╝ ╠═╣ ╠═╝ ╠═╣ ║ ║   ╚═╗
  7.   ▀▀     ▀▀  ▀▀   ▀▀  ▀▀   ▀▀  ╚═╝ ╩╚═ ╩ ╩ ╩   ╩ ╩ ╩ ╚═╝ ╚═╝
  8. ───────────────────────────────────────────────────────────────────────────────
  9.   The Universal Multimedia Interface For BBS Software
  10.   Copyright 1995-Current * Larry L. Athey * BBS Utiliteez Software
  11. ───────────────────────────────────────────────────────────────────────────────
  12.  
  13.   Information Regarding MAX Graphics:
  14.   ───────────────────────────────────
  15.   Notice is hereby given that the MAXscript/MAXcontrol/MAXcolor language,
  16.   and MAXterm are products of BBS Utiliteez Software and are protected by
  17.   US copyrights listed with the US Library Of Congress (1996)....
  18.  
  19.   No changes, additions, subtractions, or other modifications shall be made
  20.   to MAXscript/MAXcontrol/MAXcolor language or the MAX Graphics development
  21.   kit without express written permission from Larry L. Athey, BBS Utiliteez
  22.   Software, Alliance, Nebraska, USA....
  23.  
  24.   The MAXscript/MAXcontrol/MAXcolor language may be used in any BBS or Door
  25.   software 100% royalty free. You are also allowed to implement full local
  26.   graphics viewing in any BBS or Door software 100% royalty free. However,
  27.   any program that uses the MAXscript/MAXcontrol/MAXcolor language *MUST*
  28.   bear the MAX Graphics/BBS Utiliteez Software copyright notice....
  29.  
  30.  
  31.   Example: MAX Graphics and the MAXscript/MAXcontrol/MAXcolor language is
  32.              (C) 1995-Current * Larry L. Athey * BBS Utiliteez Software
  33.  
  34. ───────────────────────────────────────────────────────────────────────────────    }
  35. {$A+,B-,D+,E+,F+,G+,I-,L+,N-,O+,P-,Q-,R-,S-,T-,V+,X+}
  36. PROGRAM MAXLIST;
  37.  
  38. USES CRT,DOS,TDK_VARS,DOORKIT2,DOORKIT3,CRCUNIT;
  39.  
  40. VAR
  41.   DirInfo : SEARCHREC;
  42.   TheDir  : STRING;
  43.   HomeDir : STRING;
  44.   TheFile : STRING[12];
  45.   TheCrc  : STRING[8];
  46.   Ch      : CHAR;
  47.  
  48. PROCEDURE ShowHelp;
  49. BEGIN
  50.   WINDOW(1,1,80,25);
  51.   ShowProgramAd;
  52.   WRITELN;
  53.   WRITELN;
  54.   IceText('Usage: MAXLIST.EXE [Path To Files To Process]',TRUE);
  55.   WRITE(^G);
  56.   GOTOXY(1,24); AnyKey;
  57.   ErrLevel := 6;
  58.   HALT(ErrLevel);
  59. END;
  60.  
  61. PROCEDURE StartUp;
  62. BEGIN
  63.   ShowProgramAd;
  64.   WINDOW(1,6,80,25);
  65.   TextAttr := 7;
  66.   CLRSCR;
  67. END;
  68.  
  69. PROCEDURE AddFile(FName,Crc : STRING);
  70. VAR
  71.   Txt : TEXT;
  72. BEGIN
  73.   ASSIGN(Txt,'RESOURCE.LST');
  74.   IF NOT FExist('RESOURCE.LST') THEN BEGIN
  75.     REWRITE(Txt);
  76.     CLOSE(Txt);
  77.   END;
  78.   APPEND(Txt);
  79.   WRITELN(Txt,FName + ' ' + Crc);
  80.   CLOSE(Txt);
  81. END;
  82.  
  83. BEGIN
  84.   ProgramName := 'MAXLIST.EXE v1.10';
  85.   ProgramDesc := 'MAXupdate RESOURCE.LST File Creation Utility';
  86.   GETDIR(0,HomeDir);
  87.   TheDir := AllCaps(NoPath(PARAMSTR(1)));
  88.   IF (NOT DExist(TheDir)) OR (TheDir = '') THEN ShowHelp;
  89.   StartUp;
  90.   CHDIR(TheDir);
  91.   FErase('RESOURCE.LST');
  92.   FINDFIRST('*.*',Anyfile - Directory - VolumeID,DirInfo);
  93.   WHILE DOSERROR = 0 DO BEGIN
  94.     TheFile := AllCaps(DirInfo.Name);
  95.     IF (TheFile <> 'RESOURCE.LST') AND
  96.        (TheFile <> 'ICON_LIB.001') AND
  97.        (TheFile <> 'ICON_LIB.002') AND
  98.        (TheFile <> 'ICON_LIB.003') THEN BEGIN
  99.       TheCrc := AllCaps(FileToCrc(TheFile));
  100.       TEXTCOLOR(11); WRITE('File: ');
  101.       TEXTCOLOR(14); WRITE(PadRight(TheFile,' ',15));
  102.       TEXTCOLOR(11); WRITE('CRC32 Value: ');
  103.       TEXTCOLOR(10); WRITE(PadRight(TheCrc,' ',15));
  104.       IceText('Add This File? [Y/N]',FALSE);
  105.       REPEAT Ch := UPCASE(READKEY) UNTIL Ch IN [#13,'Y','N'];
  106.       IF Ch = #13 THEN Ch := 'Y';
  107.       IceText(' ' + Ch,TRUE);
  108.       IF Ch = 'Y' THEN AddFile(TheFile,TheCrc);
  109.     END;
  110.     FINDNEXT(DirInfo);
  111.   END;
  112.   CHDIR(HomeDir);
  113.   WINDOW(1,1,80,25);
  114.   TextAttr := 7;
  115. END.
  116.